package itheima.zuoye.test2;

import cn.hutool.core.util.ObjectUtil;

import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        Cat a = new Cat("小猫",1);

        Cat b = new Cat("小猫1",2);
        if (ObjectUtil.equals(a, b)){

            System.out.println("相同");
        }else {
            System.out.println("不相同");
        }
        if (Objects.equals(a, b)){
            System.out.println("相同");
        }else {
            System.out.println("不相同");
        }
    }
}
